use super::hitls_type::{HITLS_Config, HITLS_Ctx, HITLS_Session};
pub const HS_PSK_IDENTITY_MAX_LEN: u32 = 256;
pub const HS_PSK_MAX_LEN: u32 = 512;
pub const HITLS_PSK_FIND_SESSION_CB_SUCCESS: u32 = 1;
pub const HITLS_PSK_FIND_SESSION_CB_FAIL: u32 = 0;
pub const HITLS_PSK_USE_SESSION_CB_SUCCESS: u32 = 1;
pub const HITLS_PSK_USE_SESSION_CB_FAIL: u32 = 0;
pub type HITLS_PskClientCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        hint: *const u8,
        identity: *mut u8,
        maxIdentityLen: u32,
        psk: *mut u8,
        maxPskLen: u32,
    ) -> u32,
>;
pub type HITLS_PskServerCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        identity: *const u8,
        psk: *mut u8,
        maxPskLen: u32,
    ) -> u32,
>;
pub type HITLS_PskFindSessionCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        identity: *const u8,
        identityLen: u32,
        session: *mut *mut HITLS_Session,
    ) -> i32,
>;
pub type HITLS_PskUseSessionCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        hashAlgo: u32,
        id: *mut *const u8,
        idLen: *mut u32,
        session: *mut *mut HITLS_Session,
    ) -> i32,
>;
unsafe extern "C" {
    pub fn HITLS_CFG_SetPskIdentityHint(
        config: *mut HITLS_Config,
        hint: *const u8,
        hintSize: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetPskClientCallback(
        config: *mut HITLS_Config,
        callback: HITLS_PskClientCb,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetPskServerCallback(
        config: *mut HITLS_Config,
        callback: HITLS_PskServerCb,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetPskClientCallback(ctx: *mut HITLS_Ctx, cb: HITLS_PskClientCb) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetPskServerCallback(ctx: *mut HITLS_Ctx, cb: HITLS_PskServerCb) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetPskIdentityHint(
        ctx: *mut HITLS_Ctx,
        identityHint: *const u8,
        identityHintLen: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetPskFindSessionCallback(
        config: *mut HITLS_Config,
        callback: HITLS_PskFindSessionCb,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetPskUseSessionCallback(
        config: *mut HITLS_Config,
        callback: HITLS_PskUseSessionCb,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetPskFindSessionCallback(ctx: *mut HITLS_Ctx, cb: HITLS_PskFindSessionCb) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetPskUseSessionCallback(ctx: *mut HITLS_Ctx, cb: HITLS_PskUseSessionCb) -> i32;
}
